<template>
	<view class="container">
		<view class="u-search">
			<u-search shape="round" :showAction="false"></u-search>
		</view>
		<u-row customStyle="margin-bottom: 10px">
			<u-col span="11" offset="0.5">
				<view class="content">
					<div class="card" v-for="(item,index) in greenLandList" @click="toDetail(item.interNum)">
						<div class="card-body">
							<view class="text-content">
								<view class="text-title">
									<text>绿地名称： <text v-text="item.name"></text></text>
								</view>
								<view class="text-title">
									<text>网格编号： <text v-text="item.interNum"></text></text>
								</view>
								<view class="text-title">
									<text>上传时间： <text v-text="item.date"></text></text>
								</view>
							</view>
							<view class="go-icon">
								<image src="../../static/edit.png" mode="aspectFit"></image>
							</view>
						</div>
					</div>
				</view>
			</u-col>
		</u-row>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				greenLandList: []
			}
		},
		onLoad() {
			this.initDate()
				
		},
		methods: {
			initDate() {
				if (this.$storage.get("user") != '') {
					this.greenLandList =JSON.parse(this.$storage.get("user")).green
					console.log(JSON.parse(this.$storage.get("user")))
				}

			},
			toDetail(interNum){
				// console.log(id)
				this.$utils.navigateTo("ModelPage/greenHistoryDetail?id="+interNum,'')
			},
		}
	}
</script>

<style scoped lang="scss">
	@import "messageUp.scss";
</style>
